package com.gcsoftware.web.test.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * Created by qs on 2018/4/3.
 */

@TableName("T_DM_USER_INFO")
public class UserInfo extends Model<UserInfo> {
    /**
     * 描述：定义主键策略
     类型：Enum
     默认值：IdType.ID_WORKER
     可选值：AUTO（数据库自增）、INPUT(自行输入)、ID_WORKER（分布式全局唯一ID）、UUID（32位UUID字符串）、ID_WORKER_STR（分布式全局唯一ID 字符串类型）
     */
    @TableId(value = "c_USER_ID",type = IdType.ID_WORKER_STR)
    private String id;

    @TableField(value= "c_USER_NAME")
    private String userName;

    @TableField(value= "c_LOGIN_NAME")
    private String loginName;

    @TableField(value= "c_USER_EMAIL")
    private String userEmail;

    @TableField(value= "c_LIGIN_PWD")
    private String loginPwd;

    @TableField(value= "c_LOGIN_PWD_SALT")
    private String loginPwdSalt;

    /**
     * @TableFile（exist=false），表示UserInfo类中有的属性，而对应的属性在表中没有这样的一个字段
     *
     */

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getLoginPwd() {
        return loginPwd;
    }

    public void setLoginPwd(String loginPwd) {
        this.loginPwd = loginPwd;
    }

    public String getLoginPwdSalt() {
        return loginPwdSalt;
    }

    public void setLoginPwdSalt(String loginPwdSalt) {
        this.loginPwdSalt = loginPwdSalt;
    }


    public UserInfo() {
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
